FROM oraclelinux

ENV DBCA_TOTAL_MEMORY=4096
ENV WEB_CONSOLE=false
ENV CHARACTER_SET=ZHS16GBK
ENV DB_NAME=ORCL
ENV DB_SID=ORCL
ENV DB_PASSWORD=ORCL123456
ENV ORACLE_SID=ORCL

ENV ORACLE_HOME=/u01/app/oracle/product/11.2.0/EE
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/u01/app/oracle/product/11.2.0/EE/bin

ADD entrypoint.sh /entrypoint.sh
ADD install /install

RUN groupadd dba && useradd -m -G dba oracle && mkdir /u01 && chown oracle:dba /u01
RUN yum install -y yum install oracle-rdbms-server-11gR2-preinstall glibc-static wget unzip && yum clean all

RUN /install/oracle_install.sh

EXPOSE 1521
EXPOSE 8080
VOLUME ["/docker-entrypoint-initdb.d"]

ENTRYPOINT ["/entrypoint.sh"]
CMD [""]